|
Quaqua 4.4.7 2008-07-16 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.quaqua.filechooser.Files
public class Files
This class contains various methods for manipulating Files. The current implementation only works on Mac OS X.
| Field Summary | |
|---|---|
static int |
FILE_TYPE_ALIAS
|
static int |
FILE_TYPE_DIRECTORY
|
static int |
FILE_TYPE_FILE
|
static int |
FILE_TYPE_UNKOWN
|
| Method Summary | |
|---|---|
static boolean |
canWorkWithAliases()
Returns true if this class can work with aliases. |
static boolean |
canWorkWithLabels()
Returns true if this class can work with labels. |
static java.io.File |
getAbsoluteFile(java.io.File f)
Converts the path name denoted by the file to an absolute path. |
static int |
getFileType(java.io.File f)
Returns the file type: 0=file, 1=directory, 2=alias, -1=unknown. |
static javax.swing.Icon |
getIcon(java.io.File file,
int size)
Returns the icon for the specified file. |
static java.awt.image.BufferedImage |
getIconImage(java.io.File file,
int size)
Returns the icon image for the specified file. |
static java.lang.String |
getKindString(java.io.File file)
Returns the kind string of the specified file. |
static int |
getLabel(java.io.File f)
Returns the label of the specified file. |
static java.awt.Color |
getLabelColor(int label,
int type)
Returns the color of the specified label. |
static java.io.File |
resolveAlias(byte[] serializedAlias,
boolean noUI)
Resolves a serialized Alias to a File object. |
static java.io.File |
resolveAlias(java.io.File alias,
boolean noUI)
Resolves an alias to a File object. |
static int |
resolveAliasType(byte[] serializedAlias,
boolean noUI)
Resolves an alias to a type info. |
static int |
resolveAliasType(java.io.File alias,
boolean noUI)
Resolves an alias to a type info. |
static byte[] |
toSerializedAlias(java.io.File f)
Creates a serialized Alias. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FILE_TYPE_ALIAS
public static final int FILE_TYPE_DIRECTORY
public static final int FILE_TYPE_FILE
public static final int FILE_TYPE_UNKOWN
| Method Detail |
|---|
public static java.io.File getAbsoluteFile(java.io.File f)
f - The file which we must ensure contains an absolute path.public static boolean canWorkWithAliases()
public static int getFileType(java.io.File f)
public static java.io.File resolveAlias(java.io.File alias,
boolean noUI)
alias - the Alias file to be resolved.noUI - Set this to true, if the alias should
be resolved without user interaction.
public static int resolveAliasType(java.io.File alias,
boolean noUI)
alias - the path to the alias to be resolved.noUI - Set this to true, if the alias should
be resolved without user interaction.
public static byte[] toSerializedAlias(java.io.File f)
public static java.io.File resolveAlias(byte[] serializedAlias,
boolean noUI)
noUI - Set this to true, if the alias should
be resolved without user interaction.
public static int resolveAliasType(byte[] serializedAlias,
boolean noUI)
serializedAlias - the path to the alias to be resolved.noUI - Set this to true, if the alias should
be resolved without user interaction.
public static boolean canWorkWithLabels()
public static int getLabel(java.io.File f)
public static java.awt.Color getLabelColor(int label,
int type)
label - value from 0 through 7type - 0=dark enabled,1=bright enabld,2=dark disabled,3=bright enabled
public static java.awt.image.BufferedImage getIconImage(java.io.File file,
int size)
public static javax.swing.Icon getIcon(java.io.File file,
int size)
public static java.lang.String getKindString(java.io.File file)
|
Copyright 2003-2007 (c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||